Repository navigation
Convert tooltip, modal dialog, file attachment and transcript root classes to CSS modules - #5997
Merged
Merged
Conversation
added 10 commits
October 31, 2026 11:17
… CSS module theme The tooltip keeps its webchat__tooltip class names through webChatPrefixedClassName.
…h the CSS module theme The dialog keeps its webchat__modal-dialog class names through webChatPrefixedClassName, so ViewCodeDialog.module.css and tests still select them.
…Fluent through the CSS module theme FileContent's local styles moved to FileContent.module.css; its class names keep the webchat__ prefix, so the option-driven "fileContent" style set entry still applies the style options and nothing renders differently.
…style them through the CSS module theme basic-transcript, __scrollable, __filler (BasicTranscript local styles), __activity-body (ActivityRow) and focus-trap (FocusTrap) come from CSS modules and keep their webchat__ class names, which code and tests still query.
…odules and style them through the CSS module theme webchat__surface (BasicWebChat local styles; the option-driven root style set entry stays) and webchat__css-custom-properties (Composer local styles) come from CSS modules and keep their names; CSSCustomPropertiesContainer still selects the latter for the style options.
…eason, as in the activity button FileContent, ActivityRow and FocusTrap declared local names for themes with ":not(*)" rules. They now use the declaration that the build strips once the class map is built.
… longer used for rendering Like the entries in #5881: customizing them has no effect, and their styles are in Popover.module.css and Tooltip.module.css.
…n the pull request
Eugene (OEvgeny)
force-pushed
the
OEvgeny/fix-css-fluent-context-2
branch
from
October 31, 2026 18:24
9b130dd to
cb28b4e
Compare
Eugene (OEvgeny)
commented
Nov 1, 2026
Eugene (OEvgeny)
commented
Nov 1, 2026
added 2 commits
November 1, 2026 12:04
… CSS modules are The lightning-css vibe-grep rule now also accepts ".webchat :has(> .w<hash>_", for a rule on the parent of a class.
Its only class, basic-transcript__activity-body, belongs to the transcript. FocusTrap.module.css stays: FocusTrap is also used by part grouping.
Eugene (OEvgeny)
commented
Nov 3, 2026
added 3 commits
November 2, 2026 17:33
… of the modal dialog's readable class names showModal() takes a CSS module theme, which ModalDialogComposer provides to the dialog. ViewCodeDialog passes its own class names for the dialog's parts, so its rules no longer depend on webchat__modal-dialog.
… module passed whole as its theme Replaces the hand-picked list of class names with ViewCodeDialogTheme.module.css. Its class names only reach this dialog, and ":is(dialog)" out-specifies Popover.module.css as ".view-code-dialog" did.
…Transcript.module.css local names They keep their webchat__ class names on the DOM; BasicTranscript.module.css no longer selects them through :global().
Eugene (OEvgeny)
marked this pull request as ready for review
November 3, 2026 05:16
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
Thomas Durnford (tdurnford)
as code owners
November 3, 2026 05:17
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The focused-hover close-button selector lacks sufficient specificity, allowing the later-injected base rule’s hard-coded background to override the Fluent token, including in dark themes.
1 open issue
What changed in this PR
This PR extends the CSS module theming introduced in #5993 to tooltips, modal dialogs, file attachments, and transcript roots, while preserving their readable webchat__ class names.
Changes:
- Moves component styles and Fluent overrides into CSS modules.
- Adds per-dialog CSS module themes for the View Code dialog.
- Deprecates the unused
modalDialogandtooltipstyle set entries and updates selector validation.
| File | Description |
|---|---|
packages/vibe-grep/src/rules/lightning-css.yaml |
Allows tooltip parent selectors in compiled CSS. |
packages/fluent-theme/src/private/fluentCSSModuleTheme.module.css |
Consolidates Fluent overrides for migrated classes. |
packages/fluent-theme/src/components/theme/Theme.module.css |
Moves component overrides into the shared theme module. |
packages/component/src/Transcript/FocusTrap.tsx |
Applies themed focus-trap classes. |
packages/component/src/Transcript/FocusTrap.module.css |
Exposes the focus-trap theme target. |
packages/component/src/Transcript/ActivityRow.tsx |
Applies module classes to activity focus elements. |
packages/component/src/Tooltip/private/Tooltip.tsx |
Uses CSS module classes and validates props. |
packages/component/src/Tooltip/private/Tooltip.module.css |
Defines tooltip positioning and appearance. |
packages/component/src/Styles/StyleSet/Tooltip.ts |
Documents tooltip style set deprecation. |
packages/component/src/Styles/StyleSet/ModalDialog.ts |
Documents modal style set deprecation. |
packages/component/src/Styles/createStyleSet.ts |
Marks both legacy entries as deprecated. |
packages/component/src/providers/ModalDialog/private/Popover.tsx |
Applies modal module classes and validates props. |
packages/component/src/providers/ModalDialog/private/Popover.module.css |
Defines base modal styles. |
packages/component/src/providers/ModalDialog/private/Context.ts |
Adds a per-dialog theme option. |
packages/component/src/providers/ModalDialog/ModalDialogComposer.tsx |
Composes themes around individual dialogs. |
packages/component/src/Composer.tsx |
Applies the root CSS module class. |
packages/component/src/Composer.module.css |
Moves live-region hiding styles into CSS. |
packages/component/src/BasicWebChat.tsx |
Applies the surface module class. |
packages/component/src/BasicWebChat.module.css |
Defines surface flex layout. |
packages/component/src/BasicTranscript.tsx |
Applies module classes throughout the transcript. |
packages/component/src/BasicTranscript.module.css |
Defines transcript styles and theme targets. |
packages/component/src/Attachment/Text/private/ViewCodeDialogTheme.module.css |
Adds dialog-part layout overrides. |
packages/component/src/Attachment/Text/private/ViewCodeDialog.module.css |
Removes rules moved to the dialog theme. |
packages/component/src/Attachment/Text/private/ActivityViewCodeButton.tsx |
Passes the theme when opening the dialog. |
packages/component/src/Attachment/FileContent.tsx |
Applies attachment module classes while retaining style options. |
packages/component/src/Attachment/FileContent.module.css |
Defines attachment layout and theme targets. |
.changelog/5997-fix-css-fluent-context-2.md |
Records the migration and style set deprecations. |
Review effort: Balanced
Popover.module.css is injected after the Fluent stylesheet, so its focused hover rule tied with Fluent's hover rule and won with its light gray background, also in dark themes.
William Wong (compulim)
approved these changes
Nov 3, 2026
This was referenced Nov 3, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Changelog Entry
Changed
webchat__class names, so Fluent styles them through the CSS module theme, in PR #5997, by @OEvgenyRemoved
modalDialogandtooltipstyle set entries, which no longer affect rendering, in PR #5997, by @OEvgenyDescription
These 24 classes now come from CSS modules and keep their
webchat__names. Fluent styles 18 of them through<CSSModuleThemeComposer>.styleSet.modalDialogandstyleSet.tooltipno longer apply; stylewebchat__modal-dialogandwebchat__tooltipinstead. Both go on or after 2028-10-16.Design
fileContentandrootstyle set entries read style options, so they stayViewCodeDialogstyles Popover's parts through a CSS module theme passed to the internalshowModal(), rather than per-partclassNamepropsSpecific Changes
Tooltip,Popover,FileContent,BasicTranscript(withActivityRow),BasicWebChat,Composer,FocusTrap.changelog/<PR#>-<slug>.mdReview Checklist
z-index)package.jsonandpackage-lock.jsonreviewed